package com.ququ.syb.business.withdraw.fegin;

import com.ququ.common.result.Result;
import com.ququ.syb.common.pojo.PayOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "payorder")
public interface PayOrderFegin {

    @RequestMapping(value = "/query")
    Result<PayOrder> getPayOrder(@RequestParam(value = "tradenum") String tradenum);

    @RequestMapping(value = "/query")
    Result<PayOrder> getPayOrder(@RequestParam(value = "orderno") String orderno,
                                 @RequestParam(value = "appcode") String appcode);


    @RequestMapping(value = "/list")
    Result<List<PayOrder>> listPayOrder(@RequestParam(value = "beginDate") String beginDate,
                                        @RequestParam(value = "endDate") String endDate,
                                        @RequestParam(value = "currentpage") int currentpage,
                                        @RequestParam(value = "pagesize") int pagesize,
                                        @RequestParam(value = "ordertype") Integer ordertype,
                                        @RequestParam(value = "paychannelid") String paychannelid,
                                        @RequestParam(value = "accountid") String accountid,
                                        @RequestParam(value = "appcode") String appcode);

    @RequestMapping(value = "/save", method = RequestMethod.POST ,consumes = "application/json;charset=UTF-8")
    Result<PayOrder> save(@RequestBody PayOrder payOrder);

    @RequestMapping(value = "/update", method = RequestMethod.POST ,consumes = "application/json;charset=UTF-8")
    Result<PayOrder> update(@RequestBody PayOrder payOrder);

}
